package com.swancloud.openstack.networking.v20210120.internal;

import com.swancloud.api.networking.v20210120.ProviderService;
import com.swancloud.model.network.v20210120.ServiceProviderV2;
import com.swancloud.openstack.networking.internal.BaseNetworkingServices;
import com.swancloud.openstack.networking.v20210120.domain.NeutronServiceProviderV2;

import java.util.List;
import java.util.Map;

/**
 * OpenStack (Neutron) Network based Operations
 *
 * @author Jeremy Unruh
 */
public class ProviderServiceImpl extends BaseNetworkingServices implements ProviderService {

    /**
     * {@inheritDoc}
     */
    @Override
    public List<? extends ServiceProviderV2> list(Map<String, String> filteringParams) {
        return get(NeutronServiceProviderV2.ServiceProviderV2s.class, uri("/service-providers")).params(filteringParams).execute().getList();

    }


    @Override
    public List<? extends ServiceProviderV2> list() {
        return get(NeutronServiceProviderV2.ServiceProviderV2s.class, uri("/service-providers")).execute().getList();
    }
}
